<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
cfc('core')->checklogin();
$this->model('model')->checkuser();
$return=array();
if($_RQ['op']=='get'){
	$return['item']=model('core/member')->detail($_SESSION['uid'],array('credit1','credit2','mobile','groupid','avatar','nickname'));
	if($return['item']['groupid']){
		$return['item']['group']=pdo_getcolumn('core_member_groups',array('id'=>$return['item']['groupid'],'uniacid'=>$_SESSION['uniacid']),'title');
	}else{
		$return['item']['group']='普通会员';
	}
	$user = pdo_get('jy_yiliao_worker',array('mid'=>$_SESSION['uid']));
	if($user && empty($_SESSION['role_id'])){
	    $_SESSION['role_id']=$user['id'];
	}
	$return['params']['status']=1;
	$setting=uni_setting('member_setting');
	$return['registerset']=uni_setting('register');
	$return['item']['barcode']='0-';
	$return['item']['barcode'].=$_SESSION['uid']+10000000000000000;
	$return['item']['sign']=$setting['sign']['open'];
	$return['item']['tixians']=$setting['member']['tixians'];
	$return['item']['cardbg']=$setting['cardbg'];
	$member['ideal_money']=pdo_getcolumn('core_ideal_money',array('mid'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']),'money');
	$return['item']['ideal_money']=$member['ideal_money']?$member['ideal_money']:'0.00';
	$return['item']['mycoupon']=pdo_count('jy_weishop_coupon_getlog',array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid'],'isuse'=>0),'id');
	$return['account']=$_SESSION['account'];	


	set_html('title','医生使用中心');
	
	//
	exi($return);
}
